/*
 * Copyright (c) by HzJbbis
 * All rights reserved.
 */

package hzjbbis.framework.taglib;

import hzjbbis.framework.taglib.html.HtmlTag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * @author lix
 * @version 1.0
 */
public class ComponentTagExample extends TagSupport implements ComponentTag {

	/**
	 * @see javax.servlet.jsp.tagext.Tag#doStartTag()
	 */
	public int doStartTag() throws JspException {
		HtmlTag html = (HtmlTag) findAncestorWithClass(this, HtmlTag.class);
		if(html != null) {
		    html.setUpTag(this);
		}
		TagUtils.print(pageContext, "this is a ComponentTag!");
		return super.doStartTag();
	}

	/**
	 * @see hzjbbis.framework.taglib.ComponentTag#initTag()
	 */
	public void initTag() {
	}

}